package com.my.biz.domain;

import java.io.Serializable;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
 import java.lang.Integer;
 import java.lang.Long;
 import java.lang.String;
 import java.util.Date;
 /**
 * 
 * @描述： 实体Bean
 * 
 * @创建人： ch
 * 
 * @创建时间：2017年07月05日 18:07:39
 * 
 */
public class CodeDO implements Serializable {
	
	private static final long serialVersionUID = -8953209687801219636L;
	
    /**
     *
     */
	private Integer id;
	
    /**
     *
     */
	private String account;
	
    /**
     *
     */
	private String code;
	
    /**
     *超时时间
     */
	private Long expireTime;
	
    /**
     *发送次数
     */
	private Integer sendCount;
	
    /**
     *
     */
	private Date createTime;
	
    /**
     *
     */
	private Date updateTime;
	

	

	public CodeDO() {
		super();
	}
	
	

	public CodeDO(String account) {
		super();
		this.account = account;
	}

	

	public CodeDO(String account, String code) {
		super();
		this.account = account;
		this.code = code;
	}



	public CodeDO(String account, String code, Long expireTime) {
		super();
		this.account = account;
		this.code = code;
		this.expireTime = expireTime;
		Date time = new Date(System.currentTimeMillis());
		this.createTime = time;
		this.updateTime = time;
	}



	public CodeDO(String code, Long expireTime, Integer sendCount) {
		super();
		this.code = code;
		this.expireTime = expireTime;
		this.sendCount = sendCount;
		this.updateTime = new Date(System.currentTimeMillis());
	}



	public void setId(Integer id){
		this.id = id;
	}
	
	public Integer getId(){
		return id;
	}
	
	public void setAccount(String account){
		this.account = account;
	}
	
	public String getAccount(){
		return account;
	}
	
	public void setCode(String code){
		this.code = code;
	}
	
	public String getCode(){
		return code;
	}
	
	public void setExpireTime(Long expireTime){
		this.expireTime = expireTime;
	}
	
	public Long getExpireTime(){
		return expireTime;
	}
	
	public void setSendCount(Integer sendCount){
		this.sendCount = sendCount;
	}
	
	public Integer getSendCount(){
		return sendCount;
	}
	
	public void setCreateTime(Date createTime){
		this.createTime = createTime;
	}
	
	public Date getCreateTime(){
		return createTime;
	}
	
	public void setUpdateTime(Date updateTime){
		this.updateTime = updateTime;
	}
	
	public Date getUpdateTime(){
		return updateTime;
	}
	

	@Override
	public String toString() {
		return JSON.toJSONString(this, SerializerFeature.UseISO8601DateFormat);
	}
}

